package org.example.interfaces;

public interface Usb {
    void tranferData();
}
class Mouse implements Usb{

    @Override
    public void tranferData() {
        System.out.println("鼠标数据在传输");
    }
}
class Fan implements Usb{
    @Override
    public void tranferData() {
        System.out.println("风扇在转动~");
    }
}
//class Computer{
//    void ctlUsb(Usb usb){
//        System.out.println("电脑和Usb设置接通");
//        usb.tranferData();
//    }
//
//    public static void main(String[] args) {
//        Computer computer = new Computer();
//        computer.ctlUsb(new Fan());
//        computer.ctlUsb(new Mouse());
//    }
//}
